//通知管理模块api
import axiosApi from "./AxiosApi.js";
//发送短信
const sendTextMessage = {
  // 获取数据
  page: {
    url: `/xssc/smsReport/pageSampleReport`,
    method: "POST"
  },
  // 直接发送
  send: {
    url: `/xssc/smsReport/sendSmsReport`,
    method: "POST"
  },
  // 获取模板内容
  getSampleContent: {
    url: `/xssc/smsReport/getSampleContent`,
    method: "POST"
  },
  // 编辑发送
  sendEditSmsReport: {
    url: `/xssc/smsReport/sendEditSmsReport`,
    method: "POST"
  }
};
//单项发送
const oneSend = {
  // 获取数据
  page: {
    url: `/xssc/smsExperiment/pageSampleExperiment`,
    method: "POST"
  },
  // 直接发送
  send: {
    url: `/xssc/smsExperiment/sendSmsReport`,
    method: "POST"
  },
  // 获取模板内容
  getExperimentContent: {
    url: `/xssc/smsExperiment/getExperimentContent`,
    method: "POST"
  },
  // 编辑发送
  sendEditSmsReport: {
    url: `/xssc/smsExperiment/sendEditSmsReport`,
    method: "POST"
  }
};
//短信模板
const noteTemplate = {
  // 分页列表查询
  page: {
    url: `/xssc/msgsTemplate/page`,
    method: "POST"
  },
  // 新增
  add: {
    url: `/xssc/msgsTemplate`,
    method: "POST"
  },
  // 修改
  edit: {
    url: `/xssc/msgsTemplate`,
    method: "PUT"
  },
  // 删除
  delete: {
    url: `/xssc/msgsTemplate`,
    method: "DELETE"
  },
};

// 通知管理
const informManage = {
  // 分页列表查询
  page: {
    url: `/xssc/informQuery/pageSmsReportRecord`,
    method: "POST"
  },
  // 通知-查询
  informList: {
    url: `/xssc/informQuery/informList`,
    method: "GET"
  },
  // 通知-保存
  informSave: {
    url: `/xssc/informQuery/informSave`,
    method: "POST"
  },

}

// 发送记录
const sendRecord = {
  // 分页列表查询
  page: {
    url: `/xssc/smsReportRecord/pageSmsReportRecord`,
    method: "POST"
  },

}
export default {
  sendTextMessage: {
    page(data) {
      return axiosApi({
        ...sendTextMessage.page,
        // formData: true,
        data
      });
    },
    send(data) {
      return axiosApi({
        ...sendTextMessage.send,
        // formData: true,
        data
      });
    },
    getSampleContent(data) {
      return axiosApi({
        ...sendTextMessage.getSampleContent,
        // formData: true,
        data
      });
    },
    sendEditSmsReport(data) {
      return axiosApi({
        ...sendTextMessage.sendEditSmsReport,
        // formData: true,
        data
      });
    }
  },
  oneSend: {
    page(data) {
      return axiosApi({
        ...oneSend.page,
        // formData: true,
        data
      });
    },
    send(data) {
      return axiosApi({
        ...oneSend.send,
        // formData: true,
        data
      });
    },
    getExperimentContent(data) {
      return axiosApi({
        ...oneSend.getExperimentContent,
        // formData: true,
        data
      });
    },
    sendEditSmsReport(data) {
      return axiosApi({
        ...oneSend.sendEditSmsReport,
        // formData: true,
        data
      });
    },
  },
  noteTemplate: {
    page(data) {
      return axiosApi({
        ...noteTemplate.page,
        // formData: true,
        data
      });
    },
    add(data) {
      return axiosApi({
        ...noteTemplate.add,
        // formData: true,
        data
      });
    },
    edit(data) {
      return axiosApi({
        ...noteTemplate.edit,
        // formData: true,
        data
      });
    },
    delete(data) {
      return axiosApi({
        ...noteTemplate.delete,
        // formData: true,
        data
      });
    },
  },
  informManage: {
    page(data) {
      return axiosApi({
        ...informManage.page,
        // formData: true,
        data
      });
    },
    informList(data) {
      return axiosApi({
        ...informManage.informList,
        // formData: true,
        data
      });
    },
    informSave(data) {
      return axiosApi({
        ...informManage.informSave,
        // formData: true,
        data
      });
    },
  },
  sendRecord: {
    page(data) {
      return axiosApi({
        ...sendRecord.page,
        // formData: true,
        data
      });
    },
  }
};
